#include "wifi.h"
static const IAicStrmUser WIFI_AIC_USER = {
	.OnStrmOn = NULL,
	.OnStrmOff = NULL,
	.OnVencFrm = NULL,
	.OnVideoFrm = NULL,
};
int ExtPlugInit(const IAicStrmUser** userItf, void** userObj)
{
	LOGI("ExtPlug ApdInit\n");
	char apSsid[50] = {0};
	int ret = -1;
	*userItf = &WIFI_AIC_USER;
	ApdInit();					// 初始化wifi AP，并启动hostapd服务
	strcpy(apSsid,ApdSsid());	// 获取AP的SSID
	LOGI("ap %s\n",apSsid);
	ret = setenv("APSSID",apSsid,1); // 将获取到的SSID设置成一个环境变量
	if(ret < 0){
		LOGI("set env fail\n");
	}
	return 0;
}
int ExtPlugExit(void)
{
	LOGI("ExtPlug ApdExit\n");
	if(getenv("APSSID") != NULL){
		unsetenv("APSSID");
	}
	ApdExit();
	return 0;
}

